﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HamcoWcs.Models.Common
{
    internal static class TimeSpanExtension
    {
        public static string GetDuration(this TimeSpan t)
        {
            if (t.Days > 0)
            {
                return t.ToString("dd\\.hh\\:mm\\:ss");
            }
            else
            {
                return t.ToString("hh\\:mm\\:ss");
            }
        }
    }
}
